package com.weixing.mall.provider.service.impl;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.weixing.mall.base.constant.DatePattern;
import com.weixing.mall.util.number.NumberPatternEnum;
import com.weixing.mall.util.number.NumberToRmbUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.sql.SQLOutput;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedList;
import java.util.Vector;

public class test {
    private static final Logger logger = LogManager.getLogger(test.class);//log4j
    public static void main(String[] args){
//        Collections collections ;
//        Vector vector = new Vector<>();
//        LinkedList linkedList = new LinkedList();


//        System.out.println("18736000723".substring(5));
//
//
//        NumberToRmbUtil.format(null, NumberPatternEnum.PAT_DEFAULT.getValue());


//        Object obj = "-1";
//
//        int ii = Integer.parseInt(obj.toString());
//
//        System.out.println(ii);
//
//
//        Date now = new Date();
//        Date last = DateUtil.parse("20211120", DatePattern.PURE_DATE_PATTERN);
//        long between = DateUtil.between(now, last, DateUnit.DAY,false);
//        System.out.println(between);




        String user = "${java:os}";

        logger.info("user:{}", user);

        DateTime startTime = DateUtil.parse("2021-12-30 23:23:23", com.weixing.mall.base.constant.DatePattern.NORM_DATETIME_PATTERN);
        DateTime effectEnd = DateUtil.parse("2022-12-30 23:23:23", DatePattern.NORM_DATETIME_PATTERN);
        int compare = DateUtil.compare(startTime, effectEnd);
        System.out.println(compare);
    }

}
